package Class;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("老李","《数据库原理》");
        map.put("老张","《算法设计与分析》");

        map.put("孙悟空","《人工智能》");
        Set<String> set = map.keySet();
        for (String s:set){
            String s1 = map.get(s);
            System.out.println(s+"教"+s1);
        }

        System.out.println("教《算法设计与分析》的老师有：");
        for (String s:set){
            String s1 = map.get(s);
            if (s1.equals("《算法设计与分析》")){
                System.out.print(s);
            }
        }
    }
}
